@import 'sass-utils';

// Yaru custom definitions
$base_hover_color: transparentize(white, 0.8);
$base_active_color: transparentize(white, 0.75);

$active_bg_color: transparentize($fg_color, 0.8);
$active_fg_color: darken($fg_color, if($variant=='light', 5%, 3%));

$panel_bg_color: darken($jet, 2%);
$panel_fg_color: darken($porcelain, 2%);

$panel-alpha-value: 0.6;
$panel_opaque_value: 0.0;

$dash_background_color: lighten($jet, 2%);
$dash-alpha-value: 0.6;
$dash-opaque-alpha-value: 0.0;

$suggested_bg_color: if($variant=='light', lighten($green, 5%), darken($green, 5%));
$suggested_border_color: if($variant=='light', darken($suggested_bg_color, 5%), darken($suggested_bg_color, 10%));

$alt_borders_color: if($variant=='light', darken($bg_color, 24%), darken($bg_color, 10%));

$system_borders_color: $yaru_borders_color_dark; // Yaru: use our definition
$system_overlay_bg_color: $dash_background_color; // Yaru - Use system bg color for overlay items

// card elements
$card_bg_color: if($variant =='light', $light_1, lighten($bg_color, 7%));
$card_shadow_color: if($variant =='light', transparentize($inkstone, .97), transparent);
$card_shadow_border_color: if($variant =='light', transparentize($inkstone, .91), transparent);

// Yaru overrides for osd colors
$osd_fg_color: #eeeeec;
$osd_bg_color: transparentize(lighten($jet, 2%), 0.025);
$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
$osd_borders_color: transparentize(black, 0.3);
$osd_outer_borders_color: transparentize(white, 0.84);

// Overrides defaults for contrast optimized ones.

// colors for destructive elements
$destructive_bg_color: optimize-contrast($destructive_fg_color, $red, $target: 5.5);
$destructive_color: optimize-contrast($bg_color, $red, $target: 6.0);

// colors for levelbars, entries, labels and infobars
$success_bg_color: optimize-contrast($success_fg_color, $green, $target: 5.5);
$success_color: optimize-contrast($bg_color, $green, $target: 6.0);

$warning_bg_color: optimize-contrast($warning_fg_color, $yellow, $target: 5.5);
$warning_color: optimize-contrast($bg_color, $yellow, $target: 6.0);
$warning_fg_color: optimize-contrast($warning_bg_color,
    composite($warning_bg_color, $warning_fg_color), $target: 5.5);

$warning_caption_bg_color: composite($bg_color, transparentize($warning_color, 0.9));
$warning_caption_color: optimize-contrast($warning_caption_bg_color,
    $warning_color, $target: 6.0);

$error_bg_color: optimize-contrast($error_fg_color, $red, $target: 5.5);
$error_color: optimize-contrast($bg_color, $red, $target: 6.0);
